import java.util.HashMap;
import java.util.Scanner;

/**
 * 计算24点是一种扑克牌益智游戏，随机抽出4张扑克牌，通过加(+)，减(-)，乘(*), 除(/)四种运算法则计算得到整数24，本问题中，扑克牌通过如下字符或者字符串表示，其中，小写joker表示小王，大写JOKER表示大王：
 * 3 4 5 6 7 8 9 10 J Q K A 2 joker JOKER
 * 本程序要求实现：输入4张牌，输出一个算式，算式的结果为24点。
 */
public class twentyFourGame {
    private static HashMap<String, Integer> hashMap = new HashMap<String,Integer>(){{
        put("A",1);
        put("2",2);
        put("3",3);
        put("4",4);
        put("5",5);
        put("6",6);
        put("7",7);
        put("8",8);
        put("9",9);
        put("10",10);
        put("J",11);
        put("Q",12);
        put("K",13);
    }};
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            String str = scanner.nextLine();
            String[] cardList = str.split(" ");
            if(str.contains("joker") || str.contains("JOKER")){
                System.out.println("ERROR");
            }else {
                if(!dfs(cardList,0,"",0)){
                    System.out.println("NONE");
                }
            }
        }
    }
    private static boolean dfs(String[] cardList, int res, String s, int n) {
        //对所有牌进行遍历
        for (int i = 0; i < cardList.length; i++) {
            String temp = cardList[i];
            if(!temp.equals("")){
                cardList[i] = "";
                int a = hashMap.get(temp);
                if(n==0){
                    if(dfs(cardList,a,s+temp,n+1)){
                        return true;
                    }
                }else {
                    if(dfs(cardList, res + a,  s + "+" + temp, n+1) ||
                            dfs(cardList, res - a,  s + "-" + temp, n+1) ||
                            dfs(cardList, res * a, s + "*" + temp, n+1) ||
                            dfs(cardList, res / a,  s + "/" + temp, n+1) ){
                        return true;
                    }
                }
                cardList[i] = temp;
            }
        }
        if(res == 24 && n == cardList.length){
            System.out.println(s);
            return true;
        }
        return false;
    }
}
